import requests
from bs4 import BeautifulSoup

header = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'
}

url='http://jwc.cufe.edu.cn/tzgg.htm'
response = requests.get(url, headers=header)
response.encoding = 'utf-8'
soup = BeautifulSoup(response.text, 'html.parser')

# print('soup: ',soup)
# print('type:soup ',type(soup))
#
# print('soup.head ',soup.head)
# print('type:soup.head ',type(soup.head))
#
# print('soup.head.title: ',soup.head.title)
# print('type:soup.head.title ',type(soup.head.title))
#
# print('soup.body.div: ',soup.body.div)
# print('soup.body.div.a: ',soup.body.div.a)
#
# data = soup.div.contents
# print(data)
# print(type(data))
# print(len(data))
#
# for content in data:
#     print('-' * 50)
#     print(content)

data = soup.find_all(name='a')
print(type(data))
index=1
number=1
for data_e in data:
    if index>=54 and index<=68:
        print(number,':',data_e.text)
        number+=1
    index+=1

